#include "Constant.h"

// 构造函数实现
GNSSconsts::GNSSconsts() {
    SpeedOfLight = 299792458.0;      // 光速 (m/s)
    Pi = 3.141592653589793;         // 圆周率
    refEllip = { 0.0,0.0,0.0,0.0 };
    r2d = 57.295779513082321;       // 弧度转角度系数
}

// 获取光速
double GNSSconsts::get_SpeedOfLight() {
    return SpeedOfLight;
}

// 获取圆周率
double GNSSconsts::get_Pi() {
    return Pi;
}

// 获取弧度转角度系数
double GNSSconsts::get_r2d() {
    return r2d;
}

// 获取参考椭球参数
RefEllip GNSSconsts::get_refEllip()
{
    return this->refEllip;
}

// BDS坐标系常量构造函数
BDSConsts::BDSConsts() {
    this->refEllip =
    { 6378137.0, 1.0 / 298.257222101 , 3986004.418e8, 7.292115e-5 }; // BDCS参考椭球参数
}

// GPS坐标系常量构造函数
GPSConstant::GPSConstant() {
    this->refEllip =
    { 6378137.0, 1 / 298.257223563, 3986004.418e8, 7.292115e-5 }; // WGS 84参考椭球参数
}

